home *** CD-ROM | disk | FTP | other *** search
/ Super Shareware Collection / Super Shareware Collection.iso / os_2 / memsz220.zip / PROCESS.CPP < prev    next >
Text File  |  1994-02-07  |  699b  |  38 lines

  1. // Class PROCESS: Encapsulates the startup/shutdown logic for a OS/2-PM process.
  2.  
  3. #define INCL_WIN
  4. #include <os2.h>
  5.  
  6. #include "debug.h"
  7.  
  8. #include "process.h"
  9.  
  10.  
  11. // Constructor
  12.  
  13. Process::Process ( LONG QueueSize )
  14. {
  15.   Anchor = WinInitialize ( 0 ) ;
  16.   if ( Anchor == 0 )
  17.   {
  18. //  Log ( "ERROR: Unable to initialize for windowing.\r\n" ) ;
  19.     DosExit ( EXIT_PROCESS, 1 ) ;
  20.   }
  21.  
  22.   Queue = WinCreateMsgQueue ( Anchor, QueueSize ) ;
  23.   if ( Queue == 0 )
  24.   {
  25. //  Log ( "ERROR: Unable to create process message queue.\r\n" ) ;
  26.     DosExit ( EXIT_PROCESS, 1 ) ;
  27.   }
  28. }
  29.  
  30.  
  31. // Destructor
  32.  
  33. Process::~Process ( )
  34. {
  35.   WinDestroyMsgQueue ( Queue ) ;
  36.   WinTerminate ( Anchor ) ;
  37. }
  38.